#ifndef TABCREATORDIALOG_H
#define TABCREATORDIALOG_H

#include <QDialog>
#include "ui_tabcreatordialog.h"
#include "Chord.h"

void FillChordsLists(string chordLine);
string LoadFile(QString fileName, bool isChordsFile);
void AddChordToTab(string chord);
void CreateChordGroups();


class TabCreatorDialog : public QDialog, public Ui::TabCreatorDialog
{
    Q_OBJECT

public:
    TabCreatorDialog(QWidget *parent = 0);
    void NewLine();
    QString ConvertLabelsToText();
//    void ConvertTextToLabels(string text);
    void addChord(string chordColumn);
    void parseTextFile(string textFile);

private slots:
    void fillSubList(int index);
    void insertChord();
    void clearTab();
    void displayPreview(int index);
    void loadTabFile();
    void saveTabFile();
    void insertNewLine();

private:
    void FillChordsMainList();
    QList<QLabel*> _tabLabels;
    QLabel *_tabStartLabel;
    QLabel *_tabEndLabel;
};

#endif // TABCREATORDIALOG_H
